<template>
  <div>
    <swiper>
      <swiper-item v-for="i in banner">
        <a :href="i.link">
          <img :src="i.image" @load="imgLoad"/>
        </a>
      </swiper-item>
    </swiper>
  </div>
</template>

<script>
  import Swiper from 'components/common/swiper/Swiper'
  import SwiperItem from 'components/common/swiper/SwiperItem'
  export default{
    name:'',
    props:{
      banner:{
        type:Array,
        default(){
          return []
        }
      }
    },
    components:{
      Swiper,SwiperItem
    },
    data(){
      return {
        is_load:false
      }
    },
    methods:{
      imgLoad(){
        if(!this.is_load){
          this.is_load=!this.is_load
          this.$emit('swpierImgLoad')
        }
      }
    }
  }
</script>

<style scoped>

</style>
